home *** CD-ROM | disk | FTP | other *** search
/ Latter-Day Clip Art / Latter-Day Clip Art.iso / browser.dxr / 00080.ls < prev    next >
Encoding:
Text File  |  2001-11-12  |  834 b   |  31 lines

  1. on printAll
  2.   global imageResolution
  3.   daList = [32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56]
  4.   repeat with c in daList
  5.     repeat with m = 1 to the number of castMembers of castLib c
  6.       theDoc = new(xtra("PrintOMatic"))
  7.       if objectp(theDoc) then
  8.         w = member(m, c).width / imageResolution.float * 72
  9.         h = member(m, c).height / imageResolution.float * 72
  10.         if w > 611 then
  11.           hmarg = 20
  12.           vmarg = 20
  13.         else
  14.           hmarg = (611 - w) / 2
  15.         end if
  16.         if h > 791 then
  17.           vmarg = 20
  18.           hmarg = 20
  19.         else
  20.           vmarg = (791 - h) / 2
  21.         end if
  22.         setMargins(theDoc, rect(hmarg, vmarg, hmarg, vmarg))
  23.         append(theDoc, member(m, c), 0)
  24.         print(theDoc)
  25.       end if
  26.       theDoc = 0
  27.       unload()
  28.     end repeat
  29.   end repeat
  30. end
  31.